package com.szl.yeb.controller;

import com.szl.yeb.common.R;
import com.szl.yeb.service.AdminService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: yeb
 * @description: 在线聊天服务接口
 * @author: szl
 * @create: 2022-09-02 15:41
 **/
@Api(tags = "在线聊天服务接口(ChatController)")
@RestController
@RequestMapping("/chat")
public class ChatController {

    @Autowired
    private AdminService adminService;

    @ApiOperation("获取所有操作员")
    @GetMapping("/admin")
    public R<Object> getAdmins(String keyword) {
        return R.obj(adminService.selectOtherAdminsWithRoles(keyword));
    }
}
